﻿using System;
using Kiva7.Utilities;
using Kiva7.DataResponse;
using Kiva7.DataClasses;

namespace Kiva7.DataRequests
{
    public class LoanLendersRequest : DataRequest<LendersResponse, Lender>
    {
        public LoanLendersRequest()
            : base(true, true)
        {
        }
        public Uri BuildUri(int loanId)
        {
            UrlCreator url = new UrlCreator(string.Format(BaseUrl + "loans/{0}/lenders.xml", loanId));

            url.Add("app_id", KivaAppId);

            return url.ToUri();
        }

        public void GetLenders(int loanId)
        {
            base.LoadResponse(BuildUri(loanId));
        }

    }
}
